"""
=================================================
@Author: Zenon
@Date: 2025-05-21
@Description：System Entry File
==================================================
"""
import sys
import os
from PySide6.QtWidgets import QApplication
from ui.main_window import TSADSystem
from utils.log_handler import LogHandler

# 确保必要目录存在
os.makedirs("logs", exist_ok=True)

def main():
    # 初始化日志处理器
    log_handler = LogHandler()
    logger = log_handler.get_logger()
    
    logger.info("TSAD系统启动中...")
    
    app = QApplication(sys.argv)
    window = TSADSystem()
    window.show()
    sys.exit(app.exec())

if __name__ == "__main__":
    main()